package com.neural.metric;

import static java.lang.Math.pow;
import static java.lang.Math.sqrt;

import java.util.List;

public class EuclidesMetric extends Metric {

	public EuclidesMetric() {
		super("euclides");
	}

	@Override
	public Double getValueFor(List<Double> distances) {
		Double value = 0.0;
		for (Double dist : distances) {
			value += pow(dist, 2.0);
		}
		return sqrt(value);
	}
}
